package com.mitaotao._1_语法._3_分支._3_if判断;

import java.util.Scanner;

public class _01_根据成绩输出等级_3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入需要判断的成绩：");
        //定义分数变量，用来接收输入的成绩
        int score;
        String grade;//接收等级
        score = scanner.nextInt();

        if (score<=100 && score>=90){
            grade = "A";
        } else if (score>=80 && score<=89) {
            grade = "B";
        } else if (score>=70 && score<=79) {
            grade = "C";
        } else if (score>=60 && score<=69) {
            grade = "D";
        }else {
            grade = "E";
        }
        System.out.println("该成绩对应的等级为"+grade);
        scanner.close();
    }
}
